package com.ruoyi.project.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 进件查询支付对象 sys_query_pay
 *
 * @author ruoyi
 * @date 2024-07-23
 */
@Accessors(chain = true)
@Data
public class SysQueryPay extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 本系统系统单号
     */
    @Excel(name = "系统支付单号")
    private String orderNo;

    /**
     * 进件单号
     */
    @Excel(name = "进件单号")
    private Long queryId;

    /**
     * 关键字
     */
    @Excel(name = "查询关键字")
    private String keyword;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 剩余红包机会次数
     */
    @Excel(name = "剩余红包机会次数")
    private Integer redPacketNum;

    /**
     * 红包机会次数
     */
    @Excel(name = "已获取红包总额")
    private BigDecimal redPacket;

    /**
     * 商品标题
     */
    @Excel(name = "商品标题")
    private String subject;

    /**
     * 商品描述
     */
    @Excel(name = "商品描述")
    private String body;

    /**
     * 系统底价
     */
    @Excel(name = "系统底价")
    private BigDecimal sysFloorPrice;

    /**
     * 上级代理抽成额度
     */
    @Excel(name = "上级代理抽成额度")
    private BigDecimal royalty;

    /**
     * 上级代理抽成单号
     */
    @Excel(name = "上级抽成提现单号")
    private String royaltyId;

    /**
     * 用户底价
     */
    @Excel(name = "用户底价")
    private BigDecimal floorPrice;

    /**
     * 用户佣金
     */
    @Excel(name = "用户佣金")
    private BigDecimal brokerage;

    /**
     * 本单用户提现记录的id
     */
    @Excel(name = "用户佣金提现单号")
    private String brokerageId;

    /**
     * 最终定价
     */
    @Excel(name = "最终定价", readConverterExp = "订单金额")
    private BigDecimal pricing;

    /**
     * 实际支付金额
     */
    @Excel(name = "实际支付金额")
    private BigDecimal actualPayAmount;

    /**
     * 支付平台生成的唯一订单号
     */
    @Excel(name = "支付平台单号")
    private String platformOrderNo;

    /**
     * 实际支付方式
     */
    @Excel(name = "实际支付方式")
    private String payType;

    /**
     * 付款成功标志
     */
    @Excel(name = "付款状态")
    private String payState;

    /**
     * 付款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 佣金退款处理
     */
    @Excel(name = "佣金退款处理")
    private String refundDis;

    /**
     * 提成退款处理
     */
    @Excel(name = "提成退款处理")
    private String refundDis_;

    private String delSign;

    public SysQueryPay() {
    }

    public SysQueryPay(String orderNo) {
        this.orderNo = orderNo;
    }

    public SysQueryPay(String orderNo, String brokerageId, Boolean zt) {
        this.orderNo = orderNo;
        this.brokerageId = brokerageId;
    }

    public SysQueryPay(String orderNo, String royaltyId) {
        this.orderNo = orderNo;
        this.royaltyId = royaltyId;
    }

    public SysQueryPay(String orderNo, String actualPayAmount, String platformOrderNo, String payState, Date payTime) {
        this.orderNo = orderNo;
        this.actualPayAmount = new BigDecimal(actualPayAmount);
        this.platformOrderNo = platformOrderNo;
        this.payState = payState;
        this.payTime = payTime;
    }

    public SysQueryPay(String orderNo, Integer redPacketNum, BigDecimal redPacket) {
        this.orderNo = orderNo;
        this.redPacketNum = redPacketNum;
        this.redPacket = redPacket;
    }

}
